package com.chixing.day05_oop;

public class BankTest {
    public static void main(String[] args) {
        //随机数
        double ran = Math.random();
        System.out.println(ran);

        //随机生成10个整数 [1-10）
        for (int i = 0;i<10;i++){
            double ran1 = Math.ceil(Math.random()*9);
            System.out.println(ran1);
        }

        System.out.println();

        // 0:1 = 7:3
        int count = 0;
        for (int i = 0;i<10;i++){
            double ran2 = Math.round(Math.random());
            if (ran2 == 1.0){
                count++;
            }
            if (count==3){
                double ran3 =Math.floor(Math.random());
                System.out.println(ran3);
            }else {
                System.out.println(ran2);
            }

        }
    }
}
